package com.my.study.designPatterns.factoryPattern;

import java.util.ArrayList;
import java.util.List;

public abstract class Pizza {

    protected String name;
    //面团
    protected String dough;
    //酱
    protected String sauce;

    //添加的东西
    List<String> toppings = new ArrayList<>();

    void prepare(){
        System.out.println("Preparing :" + name);
        System.out.println("Tossing dough---");
        System.out.println("Addding asuce....");
        System.out.println("Adding topping: ");
        toppings.forEach(top->{
            System.out.print(top + " ");
        });
    }

    void bake(){
        System.out.println("Bake for 25 minutes at 350");
    }

    void cut(){
        System.out.println("Cutting the pizza into diagonal slices");
    }

    void box(){
        System.out.println("Place pizz in official PizzaStore box");
    }

    public String getName(){
        return name;
    }

}
